package net.zhengxinyun.performance.mapper.Indicators;

import net.zhengxinyun.performance.entity.CountryUnitScoreEntity;
import net.zhengxinyun.performance.entity.DepartmentEntity;
import net.zhengxinyun.performance.filter.CountryUnitIndicatorsFilter;
import net.zhengxinyun.performance.filter.CountryUnitScoreFilter;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface CountryUnitScoreEntityMapper {
    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_country_unit_score
     *
     * @mbg.generated Mon Jun 24 10:50:28 CST 2019
     */
    int deleteByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_country_unit_score
     *
     * @mbg.generated Mon Jun 24 10:50:28 CST 2019
     */
    int insert(CountryUnitScoreEntity record);


    int insertByBatch(List<CountryUnitScoreEntity> countryUnitScoreEntity);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_country_unit_score
     *
     * @mbg.generated Mon Jun 24 10:50:28 CST 2019
     */
    int insertSelective(CountryUnitScoreEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_country_unit_score
     *
     * @mbg.generated Mon Jun 24 10:50:28 CST 2019
     */
    CountryUnitScoreEntity selectByPrimaryKey(Long id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_country_unit_score
     *
     * @mbg.generated Mon Jun 24 10:50:28 CST 2019
     */
    int updateByPrimaryKeySelective(CountryUnitScoreEntity record);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table inv_country_unit_score
     *
     * @mbg.generated Mon Jun 24 10:50:28 CST 2019
     */
    int updateByPrimaryKey(CountryUnitScoreEntity record);

    /**
     * 查询所有的县直属单位
     * @return
     */
    List <DepartmentEntity> queryCountryUnit();

    List<CountryUnitScoreEntity> countCountryUnitScore(Long id);

    List<CountryUnitScoreFilter> query(CountryUnitScoreFilter filter);

    /**
     * 查询所有的指标数据
     * @return
     */
    List<Map<Integer,String>> queryIndicators();

    List<CountryUnitScoreEntity> queryScoreList(CountryUnitScoreFilter filter);

    int countScore(CountryUnitScoreFilter filter);

    int queryForCount(CountryUnitScoreFilter filter);

    /**
     * 分数数据页面 数据
     * @param filter
     * @return
     */

    List<CountryUnitScoreFilter> queryScoreHomeDate(CountryUnitScoreFilter filter);


    List<CountryUnitScoreEntity> selectByIndexId(CountryUnitScoreFilter filter );

    List<CountryUnitScoreEntity> selectDepartScore(@Param("datetime") String datetime,@Param("departCode") String departCode,@Param("indexYear") String indexYear);


    List<CountryUnitScoreEntity> getDepartScoreByIndexId(Long indexId );


    List<CountryUnitScoreFilter> getdeptScore(@Param("indexId") Long indexid, @Param("dateTime") String dateTime);
}